Protection circuitry for detecting an overvoltage limits a maximum voltage to protect components of the protection circuitry itself and other circuitry. For example, protection circuitry can be adapted to limit a voltage at a pin of an integrated circuit to 21 volts to protect an integrated circuit when the integrated circuit has a maximum voltage rating of 24 volts. In this example, a switching power supply may be configured to supply a set-point voltage of 15 volts to the pin. By setting the protection circuitry to limit the voltage at a pin to 21 volts, the protection circuitry restricts a voltage at the pin to less than the maximum rating of 24 volts while permitting the pin to receive the set-point voltage of 15 volts.